package com.sz.designpattern.create5.absfactory;

import com.sz.designpattern.create5.absfactory.iiterface.IProduct;
import com.sz.designpattern.create5.absfactory.iiterface.IProductFactory;

public class Test {
    public static void main(String[] args) {
        SuperFactory superFactory = new SuperFactory();
        IProduct product = superFactory.getProduct(GooglePCProduct.class);
        if (product instanceof GooglePCProduct){
            System.out.println("Test.main "+product.getName());
            System.out.println("Test.main "+((GooglePCProduct) product).getPCPort());
        }

        IProductFactory iProductFactory = new HuaWeiFactory();
        iProductFactory.getPhoneProduct();
        iProductFactory.getRouterProduct();

    }
}
